package cn.com.huzo.model.entities.trade;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Date;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 产品计划跟踪明细文件实体类
 *
 * @author 吴旭
 */
public class MasterProductionScheduleLinesTrackEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -1456939708693113944L;
    private String LinesId;
    private Long HeaderId;
    private String ParentLinesId;
    private Long ItemId;
    private Date Plan;
    private Date Actual;
    private String Status;

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getParentLinesId() {
        return ParentLinesId;
    }

    public void setParentLinesId(String ParentLinesId) {
        this.ParentLinesId = ParentLinesId;
    }

    public Long getItemId() {
        return ItemId;
    }

    public void setItemId(Long ItemId) {
        this.ItemId = ItemId;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getPlan() {
        return Plan;
    }

    public void setPlan(Date Plan) {
        this.Plan = Plan;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getActual() {
        return Actual;
    }

    public void setActual(Date Actual) {
        this.Actual = Actual;
    }

    public String getStatus() {
        return Status;
    }

    public void setStatus(String Status) {
        this.Status = Status;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MasterProductionScheduleLinesTrackEntity)) {
            return false;
        }

        final MasterProductionScheduleLinesTrackEntity that = (MasterProductionScheduleLinesTrackEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getLinesId().hashCode();
        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
